<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .top,
        .bottom{
            width: 200px;
            height: 200px;
            background-color: blue;
        }

        .top{
            margin-bottom: 100px;
        }
        /* 两个div取margin-bottom和margin-top的最大值。 */
        .bottom{
            background-color: blueviolet;
            margin-top: 50;
        }
    </style>
</head>
<body>
    <div class="top"></div>
    <div class="bottom"></div>
</body>
</html>